3.4 \(\int \frac{a+b \sin (c+d x^2)}{x} \, dx\)

Optimal. Leaf size=31 \[ a \log (x)+\frac{1}{2} b \sin (c) \text{CosIntegral}\left (d x^2\right )+\frac{1}{2} b \cos (c) \text{Si}\left (d x^2\right ) \]

[Out]

a*Log[x] + (b*CosIntegral[d*x^2]*Sin[c])/2 + (b*Cos[c]*SinIntegral[d*x^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0342408, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {14, 3377, 3376, 3375} \[ a \log (x)+\frac{1}{2} b \sin (c) \text{CosIntegral}\left (d x^2\right )+\frac{1}{2} b \cos (c) \text{Si}\left (d x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d*x^2])/x,x]

[Out]

a*Log[x] + (b*CosIntegral[d*x^2]*Sin[c])/2 + (b*Cos[c]*SinIntegral[d*x^2])/2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3377

Int[Sin[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Sin[c], Int[Cos[d*x^n]/x, x], x] + Dist[Cos[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rubi steps

\begin{align*} \int \frac{a+b \sin \left (c+d x^2\right )}{x} \, dx &=\int \left (\frac{a}{x}+\frac{b \sin \left (c+d x^2\right )}{x}\right ) \, dx\\ &=a \log (x)+b \int \frac{\sin \left (c+d x^2\right )}{x} \, dx\\ &=a \log (x)+(b \cos (c)) \int \frac{\sin \left (d x^2\right )}{x} \, dx+(b \sin (c)) \int \frac{\cos \left (d x^2\right )}{x} \, dx\\ &=a \log (x)+\frac{1}{2} b \text{Ci}\left (d x^2\right ) \sin (c)+\frac{1}{2} b \cos (c) \text{Si}\left (d x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0490486, size = 29, normalized size = 0.94 \[ a \log (x)+\frac{1}{2} b \left (\sin (c) \text{CosIntegral}\left (d x^2\right )+\cos (c) \text{Si}\left (d x^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d*x^2])/x,x]

[Out]

a*Log[x] + (b*(CosIntegral[d*x^2]*Sin[c] + Cos[c]*SinIntegral[d*x^2]))/2

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 28, normalized size = 0.9 \begin{align*} a\ln \left ( x \right ) +{\frac{b\cos \left ( c \right ){\it Si} \left ( d{x}^{2} \right ) }{2}}+{\frac{b{\it Ci} \left ( d{x}^{2} \right ) \sin \left ( c \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(d*x^2+c))/x,x)

[Out]

a*ln(x)+1/2*b*cos(c)*Si(d*x^2)+1/2*b*Ci(d*x^2)*sin(c)

________________________________________________________________________________________

Maxima [C]  time = 1.15545, size = 68, normalized size = 2.19 \begin{align*} -\frac{1}{4} \,{\left ({\left (i \,{\rm Ei}\left (i \, d x^{2}\right ) - i \,{\rm Ei}\left (-i \, d x^{2}\right )\right )} \cos \left (c\right ) -{\left ({\rm Ei}\left (i \, d x^{2}\right ) +{\rm Ei}\left (-i \, d x^{2}\right )\right )} \sin \left (c\right )\right )} b + a \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x^2+c))/x,x, algorithm="maxima")

[Out]

-1/4*((I*Ei(I*d*x^2) - I*Ei(-I*d*x^2))*cos(c) - (Ei(I*d*x^2) + Ei(-I*d*x^2))*sin(c))*b + a*log(x)

________________________________________________________________________________________

Fricas [A]  time = 2.01222, size = 144, normalized size = 4.65 \begin{align*} \frac{1}{2} \, b \cos \left (c\right ) \operatorname{Si}\left (d x^{2}\right ) + a \log \left (x\right ) + \frac{1}{4} \,{\left (b \operatorname{Ci}\left (d x^{2}\right ) + b \operatorname{Ci}\left (-d x^{2}\right )\right )} \sin \left (c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x^2+c))/x,x, algorithm="fricas")

[Out]

1/2*b*cos(c)*sin_integral(d*x^2) + a*log(x) + 1/4*(b*cos_integral(d*x^2) + b*cos_integral(-d*x^2))*sin(c)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \sin{\left (c + d x^{2} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x**2+c))/x,x)

[Out]

Integral((a + b*sin(c + d*x**2))/x, x)

________________________________________________________________________________________

Giac [A]  time = 1.11189, size = 43, normalized size = 1.39 \begin{align*} \frac{1}{2} \, b \operatorname{Ci}\left (d x^{2}\right ) \sin \left (c\right ) + \frac{1}{2} \, b \cos \left (c\right ) \operatorname{Si}\left (d x^{2}\right ) + \frac{1}{2} \, a \log \left (d x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x^2+c))/x,x, algorithm="giac")

[Out]

1/2*b*cos_integral(d*x^2)*sin(c) + 1/2*b*cos(c)*sin_integral(d*x^2) + 1/2*a*log(d*x^2)